-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix textures not exporting after loading a world that uses obj models #874
Fix textures not exporting after loading a world that uses obj models #874
Conversation
Signed-off-by: ddengster <ed.fan@osrfoundation.org>
Signed-off-by: ddengster <ed.fan@osrfoundation.org>
TEST_F(ColladaWorldExporterFixture, ExportWorldMadeFromObj) | ||
{ | ||
ignition::common::setenv("IGN_GAZEBO_RESOURCE_PATH", | ||
(std::string(PROJECT_SOURCE_PATH) + "/test/worlds:" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use ignition::common::JoinPaths here and below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed a475ee4
Signed-off-by: ddengster <ed.fan@osrfoundation.org>
@chapulina Looks like the tests failing are unrelated to this PR. Are there any other blockers for this PR? |
🦟 Bug fix
Summary
When exporting via the collada world export plugin, if the world was made using obj models the textures will not export.
The fix is a simple conditional change from
if (_matIndex < 0)
toif (newMatIndex < 0)
. The prior condition ensures that the block of code on line 124 will never execute given the circumstances, which is certainly a bug.I've also added a test that checks the existance of the textures exported. You can run the new test
./build/ignition-gazebo5/bin/INTEGRATION_collada_world_exporter
from your ignition workspace.Related: #802
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge